

<!-- 商品详情-预售拼团 -->
<template>
	<view class="body">
		<!-- #ifdef H5 -->
		<view v-if="weixinFalg" style="position: fixed; z-index: 20; top: 100px; right: 0;">
			<!-- v-pre -->
			<view >
				<wx-open-launch-app id="launch-btn" appid="wx3a03d02f5f83c054" :extinfo="detailGoodsId">
					<script type="text/wxtag-template">
						<style>
							.btn {
								border: 0;
								text-align: center;
								font-size: 15px;
								color: white;
								/* width: 130px; */
								padding: 0 25px;
								height: 36px;
								line-height: 36px;
								border-radius: 18px 0 0 18px;
								background-color: rgb(231,36,57);
							}
						</style>
						<button class="btn">APP内打开</button>
					</script>
				</wx-open-launch-app>
			</view>
		</view>
		<view v-else @click="normalBrowserLaunchApp()" class="open-plus flex-all-center">
			APP内打开
		</view>
		<!-- #endif -->


		<!-- 主体内容 -->
		<scroll-view scroll-y="true">

			<!-- 商品区域 -->
			<view id="goodsBasicTemp-Container">

				<!-- 轮播图 -->
				<view id="swiper-Container" class="swiper-Container">

					<swiper :indicator-dots="false" :interval="banner.interval" :duration="banner.duration" circular="false" class="banner"
					 :current="bannerCurrent" @change="bannerSwiperChange">

						<!-- 视频 -->
						<!-- <swiper-item v-if="goodsDetail.goodsVideo" class="video-swiper">
							<video id="myVideo" :src="imgSite + goodsDetail.goodsVideo" controls=true enable-progress-gesture=false @play="bindPlay()" @pause="pauseVideo()" @ended="endedVideo()" initial-time="0.11">
							</video>
							<cover-image v-if="goodsDetail.goodsVideo" class="playVideo-icon" @click="playVideo_icon()" src="/static/images/common/icon-play.png"></cover-image>
						</swiper-item> -->

						<!-- 图片 -->
						<swiper-item v-for="(item, index) in goodsPicture" :key="index" class="swiper-item">
							<image :src="imgSite + item" class="slide-image" mode="aspectFill" @click="looKDetail()"></image>
						</swiper-item>
					</swiper>


					<!-- 商品角标 -->
					<image v-if="goodsDetail.activityCornerPicture" class="goodsCorner" :src='imgSite + goodsDetail.activityCornerPicture' mode="widthFix"></image>


					<!-- 视频播放&显示序号 -->
					<view class="videoPlayShowNO-Container">
						<image v-if="goodsDetail.goodsVideo" class="newPlayVideo-icon" @click="playVideoHandler()" src="/static/images/common/icon-play.png"></image>

						<view class="showNO-Container">
							{{bannerCurrent+1}}/{{goodsPicture.length}}
						</view>
					</view>


					<!-- 状态栏占位 -->
					<view id="statusBar-Container" class="statusBar-Container">
					</view>

					<!-- 功能按钮栏 -->
					<view id="scrollTopHeight" class="headerBtns-Container" :style="{ opacity: opacity }">
						<view class="menus-Container">
							<image @click="navBack()" class="backBtn" :src="icon.backBtn"></image>
							<image @tap="userShareHandler()" class="shareBtn" :src="icon.shareBtn"> </image>

							<!-- 菜单 -->
							<image @click="toggleMenuListHandler()" class="menuBtn" :src="icon.msgBtn"></image>
							<view class="msgCount" v-if="noticeTipCount" style="left: 20rpx top: 0">{{noticeTipCount>99 ? '99+' : noticeTipCount}}</view>
						</view>
					</view>


					<!-- 滑动菜单 -->
					<view class="scrollHeader-Container" :style="{ opacity: 1 - opacity }">
						<view class="menus-Container">
							<image @click="navBack()" class="backBtn" :src="icon.scroll_backBtn"></image>
							<image @tap="userShareHandler()" class="shareBtn" :src="icon.scroll_shareBtn"> </image>

							<!-- 菜单 -->
							<image @click="toggleMenuListHandler()" class="menuBtn" :src="icon.scroll_msgBtn"></image>
							<view class="msgCount" v-if="noticeTipCount" style="left: -20rpx top: 0">{{noticeTipCount>99 ? '99+' : noticeTipCount}}</view>
						</view>

						<view class="threeMenus-Container">
							<view @click="scrollToMenu('goods')" class="oneMenu" :class="{currentMenu: currentScrollMenu == 'goods'}">
								商品
							</view>
							<view @click="scrollToMenu('judge')" class="oneMenu" :class="{currentMenu: currentScrollMenu == 'judge'}">
								评价
							</view>
							<view @click="scrollToMenu('detail')" class="oneMenu" :class="{currentMenu: currentScrollMenu == 'detail'}">
								详情
							</view>
						</view>
					</view>
				</view>


				<!-- 活动信息 -->
				<view class="activityInfo-Container">
					<view class="pricePercent">
						<view class="price-Container">
							<view class="priceOut">
								<view class="activityPrice-Container">
									<text class="activityPrice">可砍至</text>

									<text class="money-icon">￥</text>
									<text class="price-int">{{matchingData.salesPrice / 100}}</text>
									<!-- <text class="price-float">.00</text> -->
								</view>
							</view>
						</view>

						<view class="percent-Container">
							<view class="percentOut">
								<view class="percentIn" :style="{width: matchingData.activityPercentage+'%'}">
								</view>
								<view class="percentText">
									已抢{{matchingData.activityPercentage}}%
								</view>
							</view>
						</view>
					</view>

					<!-- 市场价&剩余 -->
					<view class="marketSurplus-Container">
						<view class="marketPrice">
							单买价 ￥{{matchingData.marketPrice / 100}}
						</view>
						<view class="surplusText">
							仅剩{{matchingData.totalStock - matchingData.saledCount}}件
						</view>
					</view>

					<image class="logoBg" :src="icon.logoBg"></image>
				</view>


				<!-- 基本信息 -->
				<view class="basicInfo-Container">
					<view class="goodNameFollow-Container">
						<view class="goodName ellipsis2">
							{{goodsDetail.goodsName}}
						</view>
					</view>

					<view v-if="goodsDetail.goodsUps" class="goodDesc ellipsis2">
						{{goodsDetail.goodsUps}}
					</view>
				</view>


				<!-- 优惠券&赠品 -->
				<view v-if="goodsDetail.collarCoupons" class="couponGift-Container detailBlock-Container">
					<view @click="showCouponModalHandler()" class="oneRow">
						<view class="title">
							优惠
						</view>
						<view class="subTitle">
							领券
						</view>
						<view class="coupon-Container">
							<view v-for="(item, index) in goodsDetail.collarCoupons" v-if="index < 2" :key="index" class="coupon-item borderOneRpx">
								<view v-if="item.couponType == 10" class="amount">
									满￥{{ item.enoughMoney / 100 }}减{{item.faceValue / 100}}
								</view>
								<view v-if="item.couponType == 20" class="amount">
									满￥{{ item.enoughMoney / 100 }}打{{item.faceValue / 10}}折
								</view>
							</view>
						</view>

						<image class="operatorBtn" :src="icon.operatorBtn" mode=""></image>
					</view>

					<view v-if="matchingData.v2GoodsDetailGiftDtos" class="oneRow">
						<view class="title">

						</view>
						<view class="subTitle">
							赠品
						</view>
						<view class="gift-Container">
							<view @click="gotoDetail('', item.giftGoodsCd)" v-for="(item, index) in matchingData.v2GoodsDetailGiftDtos" :key="index" class="gift-item ellipsis1">
								{{item.goodsName}}×{{item.giftNum}}
							</view>
						</view>
					</view>
				</view>


				<!-- 规格&运费 -->
				<view class="specExpenses-Container detailBlock-Container">
					<view @click="showSpecModalHandler()" class="oneRow borderOneRpx">
						<view class="title">
							已选
						</view>
						<view class="content ellipsis1">
							{{matchingData | getSpecStr}}
						</view>
						<image class="operatorBtn" :src="icon.operatorBtn" mode=""></image>
					</view>

					<view @click="addressDialogHandler()" class="oneRow borderOneRpx">
						<view class="title">
							送至
						</view>
						<view class="addressContent content">
							<image class="addressIcon" :src="icon.addressIcon" mode=""></image>
							<view class="addressText ellipsis1">
								{{addressStr || "请选择收货地址"}}
							</view>
						</view>
						<image class="operatorBtn" :src="icon.operatorBtn" mode=""></image>
					</view>

					<view class="oneRow">
						<view class="title">
							运费
						</view>
						<view class="content ellipsis1">
							{{matchingData.freightTemplateTitle}}
						</view>
					</view>
				</view>
			</view>


			<!-- 评价区域 -->
			<view id="judgeAreaTemp-Container" class="judgeAreaTemp-Container">
				<view v-if="goodsDetail.goodsEvaluateEntities.goodsEvaluateData.length > 0" id="judgeArea-Container" class="judgeArea-Container">
					<view class="header-Container">
						<text class="judgeText">评价 </text>
						<text class="judgeCount">{{goodsDetail.goodsEvaluateEntities.goodsEvaluateCount}}</text>

						<text @click="gotoJudgePage()" class="all-Container">
							<text class="text">
								全部
							</text>
							<image :src="icon.allJudgeBtn" mode=""></image>
						</text>
					</view>
					<view class="judgeList-Container">
						<view v-for="(item, index) in goodsDetail.goodsEvaluateEntities.goodsEvaluateData" v-if="index <= 0" :key="index"
						 class="judge-item">
							<view class="userInfo">
								<image class="profilePhoto" :src="imgSite + item.createUav"></image>
								<view class="nameStar">
									<view class="userName ellipsis1">
										{{item.createUnm}}
									</view>
									<view class="star-Container">
										<image v-for="(item, index) in parseInt(item.star)" :key="index" class="starIcon" :src="icon.starColor" mode=""></image>
										<image v-for="(item, index) in 5-parseInt(item.star)" :key="'a'+index" class="starIcon" :src="icon.starDefault" mode=""></image>
									</view>
								</view>
							</view>
							<view class="judgeContent ellipsis2">
								{{item.content}}
							</view>
							<view class="judgeImages" v-if="item.img[0]!=imgSite">
								<image v-for="(img, index1) in item.img" :key="index1" :src="img" @click="checkPic(img,index)"></image>
								<image v-if="item.img.length%4 != 0" v-for="(item2, index2) in 4-item.img.length%4" :key="'a'+index2" style="visibility: hidden;"></image>
							</view>
							<view class="judgeSpec ellipsis1">
								{{item.goodsCategoryAttr | getSpecStr}}
							</view>

							<!-- 店家回复 -->
							<image v-if="item.replyContent" class="splitLinebar" :src="icon.splitLinebar" mode=""></image>
							<view v-if="item.replyContent" class="shopReplay">
								{{item.replyContent}}
							</view>
						</view>
					</view>
				</view>


				<!-- 店铺信息 -->
				<view class="shopInfo-Container">
					<view @click="gotoShopPage()" class="shopInfo">
						<image class="shopPhoto" :src="imgSite + goodsDetail.vendorDto.logoUrl" mode=""></image>
						<view class="rightInfo">
							<view class="shopNameType">
								<view class="shopName ellipsis1">
									{{goodsDetail.vendorDto.companyName}}
								</view>
<!--								<view v-if="goodsDetail.vendorDto.selfSupporting == 0" class="shopType">-->
<!--									自营-->
<!--								</view>-->
							</view>
							<view class="star-Container">
								<image class="starIcon" :src="icon.starColor" mode=""></image>
								<image class="starIcon" :src="icon.starColor" mode=""></image>
								<image class="starIcon" :src="icon.starColor" mode=""></image>
								<image class="starIcon" :src="icon.starColor" mode=""></image>
								<image class="starIcon" :src="icon.starColor" mode=""></image>
								<!-- <image class="starIcon" :src="icon.starDefault" mode=""></image> -->

								<!-- <image v-for="(item, index) in parseInt(item.star)" :key="index" class="starIcon" :src="icon.starColor" mode=""></image>
									<image v-for="(item, index) in 5-parseInt(item.star)" :key="index" class="starIcon" :src="icon.starDefault" mode=""></image>
								</view> -->
							</view>
							<view class="attention-Container">
								<text>{{goodsDetail.vendorDto.fllowNum}}</text>人关注
							</view>

							<view class="gotoShopPage">
								<image :src="icon.goShopBtn" mode=""></image>
								<view>
									进店逛逛
								</view>
							</view>
						</view>
					</view>

					<view v-if="goodsListList.length" class="remomendGoods-Container borderOneRpx">
						<view class="title">
							推荐商品
						</view>
						<view class="goodsList-Container">
							<swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="1000" :current="recomSwiperIndex"
							 @change="recomBannerSwiperChange">
								<swiper-item v-for="(item, index) in goodsListArray" :key="index" class="swiper-item">
									<view @click="gotoDetail(goodsListList[index * 3 + idx].activityType, goodsListList[index * 3 + idx].goodsCd)" class="good-item" :class="{hideIndexN: !(index * 3 + idx < goodsListList.length)}"
										v-for="(n, idx) in nArray" :key="idx">
										<block v-if="index * 3 + idx < goodsListList.length">
											<image class="goodImage" :src="imgSite + goodsListList[index * 3 + idx].coverPicture"></image>
											<view class="goodNameType ellipsis2">
<!--												<text v-if="goodsListList[index * 3 + idx].selfSupporting == 0" class="goodType">-->
<!--													自营-->
<!--												</text>-->
												<text class="goodName">
													{{goodsListList[index * 3 + idx].goodsName}}{{goodsListList[index * 3 + idx].goodsName}}{{goodsListList[index * 3 + idx].goodsName}}
												</text>
											</view>
											<!-- <view class="priceCount">
												<text class="money-icon">￥</text>
												<text class="price-int">{{goodsListList[index * 3 + idx].salesPrice / 100}}</text>

												<text class="oldPrice">￥{{goodsListList[index * 3 + idx].marketPrice / 100}}</text>
											</view> -->

											<!-- 销售策略 10：现金 20：现金＋积分 40：积分 60:水券 70:水券 + 现金 -->
											<view v-if="goodsListList[index * 3 + idx].salesStrategy == 10" class='priceCount'>
												<text v-if="getShowMemberFlag(goodsListList[index * 3 + idx])">¥{{ goodsListList[index * 3 + idx].memberPrice / 100 }}</text>
												<text v-else>¥{{ goodsListList[index * 3 + idx].salesPrice / 100 }}</text>

												<text class="oldPrice">￥{{goodsListList[index * 3 + idx].marketPrice / 100}}</text>
											</view>
											<view v-if="goodsListList[index * 3 + idx].salesStrategy == 20" class='priceCount'>
												<text v-if="getShowMemberFlag(goodsListList[index * 3 + idx])">¥{{ goodsListList[index * 3 + idx].memberPrice / 100 }}</text>
												<text v-else>¥{{ goodsListList[index * 3 + idx].salesPrice / 100 }}</text>
<!--												<text>+</text>-->
<!--												<text>{{ goodsListList[index * 3 + idx].salesPoint }}</text>-->
<!--												<text>积分</text>-->

												<text class="oldPrice">￥{{goodsListList[index * 3 + idx].marketPrice / 100}}</text>
											</view>
<!--											<view v-if="goodsListList[index * 3 + idx].salesStrategy == 40" class='priceCount'>-->
<!--												<text>{{ goodsListList[index * 3 + idx].salesPoint }}</text>-->
<!--												<text>积分</text>-->
<!--											</view>-->
<!--											<view v-if="goodsListList[index * 3 + idx].salesStrategy == 60" class='priceCount'>-->
<!--												<text>{{ goodsListList[index * 3 + idx].waterCoupon / 100 }}</text>-->
<!--												<text>水券</text>-->
<!--											</view>-->
<!--											<view v-if="goodsListList[index * 3 + idx].salesStrategy == 70" class='priceCount'>-->
<!--												<text v-if="getShowMemberFlag(goodsListList[index * 3 + idx])">¥{{ goodsListList[index * 3 + idx].memberPrice / 100 }}</text>-->
<!--												<text v-else>¥{{ goodsListList[index * 3 + idx].salesPrice / 100 }}</text>-->
<!--												<text>+</text>-->
<!--												<text>{{ goodsListList[index * 3 + idx].waterCoupon / 100 }}</text>-->
<!--												<text>水券</text>-->

<!--												<text class="oldPrice">￥{{goodsListList[index * 3 + idx].marketPrice / 100}}</text>-->
<!--											</view>-->
											<view v-if="goodsListList[index * 3 + idx].salesStrategy == 100" class='priceCount'>
												<text v-if="getShowMemberFlag(goodsListList[index * 3 + idx])">¥{{ goodsListList[index * 3 + idx].memberPrice / 100 }}</text>
												<text v-else>¥{{ goodsListList[index * 3 + idx].salesPrice / 100 }}</text>

												<text class="oldPrice">￥{{goodsListList[index * 3 + idx].marketPrice / 100}}</text>
											</view>
										</block>
									</view>
								</swiper-item>
							</swiper>

							<!-- 商品分页 -->
							<view v-if="goodsListArray.length > 1" class="pages-Container">
								<view v-for="(item, index) in goodsListArray.length" :key="'recom'+index" class="one-page" :class="{current: index == recomSwiperIndex}">
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>


			<!-- 详情&保障 -->
			<view id="detailSafeguard-Container" class="detailSafeguard-Container">
				<view class="headerTap-Container">
					<view @click="changeContextType('goodsDetail')" class="tap borderOneRpx">
						<image v-show="contextType == 'goodsDetail'" :src="icon.tapSelBtn" mode=""></image>
						<view class="tapName" :class="{'currentTap': contextType == 'goodsDetail'}">
							商品详情
						</view>
						<image v-show="contextType == 'goodsDetail'" :src="icon.tapSelBtn" mode=""></image>
					</view>
					<view @click="changeContextType('afterSale')" class="tap">
						<image v-show="contextType == 'afterSale'" :src="icon.tapSelBtn" mode=""></image>
						<view class="tapName" :class="{'currentTap': contextType == 'afterSale'}">
							售后保障
						</view>
						<image v-show="contextType == 'afterSale'" :src="icon.tapSelBtn" mode=""></image>
					</view>
				</view>

				<view class="detailContent">
					<rich-text :nodes="detailContent"></rich-text>
				</view>
			</view>


			<!-- 底部菜单 -->
			<view class="safeBottom">
				<view class="controller-bar flex-center">

					<!-- 咨询 -->
					<view class="menu-button flex1-center" @click="gotoContactSell()" hover-class="none">
						<image :src="icon.sellBtn" lazy-load="true" mode="widthFix"></image>
						<text>咨询</text>
					</view>

					<!-- 店铺 -->
					<view class="menu-button flex1-center" @click="gotoShopPage()" hover-class="none">
						<image :src="icon.shopBtn" lazy-load="true" mode="widthFix"></image>
						<text>店铺</text>
					</view>

					<!-- 购物车 -->
					<view @click="toCart()" class="menu-button flex1-center">
						<image :src="icon.cartBtn" lazy-load="true" mode="scaleToFill"></image>
						<text>购物车</text>
						<view v-if="cartCount" class="cartCount-Container">{{cartCount>99?'99+':cartCount}}</view>
					</view>

					<view class="btn-group flex-center">
						<view v-if="!goodsDetail.isParticipate" class="addActivityBtn" @click="addActivityNowHandler('bargain')">
							发起砍价
						</view>
						<view v-else class="addActivityBtn disabledBtn">
							已发起砍价
						</view>
					</view>
				</view>
			</view>


			<!-- 限制APP购买 -->
			<!-- #ifndef APP-PLUS -->
			<!-- goodsBuyApp: 1-是; 2-不是 -->
			<view v-if="goodsDetail.goodsBuyApp == 1 && hasLogin" @click="gotoDownloadApp()" class="limitAppBuy-Container">
				<image :src="icon.downBg" class="downBg" mode=""></image>

				<view class="down-content">
					<image :src="icon.download" class="downIcon" mode=""></image>
					<view class="downDesc">下载构购APP购买</view>
				</view>
			</view>
			<view v-if="goodsDetail.goodsBuyApp == 1 && !hasLogin" class="limitAppBuy-Container">
				<image :src="icon.logoApp" class="logoApp" mode=""></image>

				<view class="buyDesc">
					好友邀请您购买APP专属商品
				</view>
				<view @click="gotoRegisterAccount()" class="registerBuy">
					注册购买
				</view>
			</view>
			<!-- #endif -->
		</scroll-view>

		<!-- 优惠券弹窗 -->
		<couponModal page="detail" :showFlag="showCouponModal" :couponList="goodsDetail.collarCoupons" @closeModalHandler="closeModalHandler()"></couponModal>

		<!-- 规格弹窗 -->
		<specModal ref="specModalChild" :showFlag="showSpecModal" :specType="specType" :buyCount="buyCount" :defaultSpecAttr="defaultSpecAttr"
			 :goodsDetail="goodsDetail"
			 :defaultMatchingData="matchingData"
			 :specSourceArrayList="specSourceArrayList" :arrangementCombination="arrangementCombination" @closeModalHandler="closeModalHandler()"
			 @changeSpecHandler="changeSpecHandler"
			 @setTabBarBadge="setTabBarBadge()"
			 @sureOperateHandler="sureOperateHandler"
			 :preGroupInfo="preGroupInfo"></specModal>


		<!-- 分享 -->
		<uni-popup ref="showpopup" :type="type" style="z-index: 100;">
			<view class="share">
				<view class="title-name flex-all-center">
					<image :src="icon.left"></image>
					分享到
					<image :src="icon.right"></image>
				</view>
				<view class="icons flex-rwo-around">
					<!-- #ifdef APP-PLUS -->
					<view class="icon-block flex-all-center">
						<image :src="icon.weixin" @click="share('0')"></image>
						<text>微信好友</text>
					</view>
					<view class="icon-block flex-all-center">
						<image :src="icon.pengyouquan" @click="share('1')"></image>
						<text>朋友圈</text>
					</view>
					<!--<view class="icon-block flex-all-center">
						<image :src="icon.weibo" @click="share('2')"></image>
						<text>微博</text>
					</view>-->
					<!-- #endif -->
					<view class="icon-block flex-all-center">
						<image :src="icon.haibao" @click="share('3')"></image>
						<text>海报分享</text>
					</view>
				</view>
				<view class="cancel" @click="cancel()">取消</view>
			</view>
		</uni-popup>


		<!-- 配送地址 -->
		<uni-popup ref="addressPopup" :type="type">
			<view class="addressPopup-content">
				<view class="title">
					配送至
					<image src="/static/images/common/closeModal.png" @click="closeAddressPopup()"></image>
				</view>
				<scroll-view scroll-y="true">
					<view class="address" v-for="(item,index) of addressList" :key="item.id" @click="addressIndex = index; closeAddressPopup();">
						<view class="left">
							<image src="/static/images/common/select.png" class="select" v-if="addressIndex == index"></image>
							<image src="/static/images/common/address.png" class="address_img" v-else></image>
						</view>
						<view class="right ellipsis2">{{item.province}}{{item.city}}{{item.district}}{{item.address}}</view>
					</view>

					<!-- TODO -->
					<button class="add-btn" v-if="addressList.length==0" @click="addAddress('add',0)">新增地址</button>

				</scroll-view>
			</view>
		</uni-popup>


		<!-- 播放视频-->
		<view v-if="playStatus" @click="closeVideoHandler()" class="videoBg-Container">
			<video id="myVideo" :src="imgSite + goodsDetail.goodsVideo" autoplay=true controls=true enable-progress-gesture=false @play="bindPlay()" @pause="pauseVideo()" @ended="endedVideo()" initial-time="0.11">
			</video>
		</view>

		<!-- 详情菜单 -->
		<view v-if="showDetailMenu" @click="toggleMenuListHandler()" class="detailMenu-Container">
			<detailMenu></detailMenu>
		</view>
	</view>
</template>


<script>
	import detailMenu from "@/components/detailMenu/detailMenu";
	import couponModal from "@/components/couponModal/couponModal";
	import specModal from "@/components/specModal/specModal";
	import {
		mapState,
		mapMutations
	} from 'vuex';

	// #ifdef H5
	import wx from 'jweixin-module';
	// #endif

	export default {
		filters: {

			//已选规格Str
			getSpecStr(json) {

				try {
					var str = "";
					json = JSON.parse(json.goodsCategoryAttr);
					for (var i = 0; i < json.length; i++) {
						str += ('"' + json[i]["value"] + '" ');
					}
					return str;
				} catch (e) {
					return "";
				}
			},

			// 时间格式化
			formatDate: function(date) {

				var date = new Date(date);
				var YY = date.getFullYear() + '.';
				var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '.';
				var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());

				return YY + MM + DD;
			},
			// 时间格式化
			formatDateTime: function(date) {

				var date = new Date(date);
				var YY = date.getFullYear() + '.';
				var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '.';
				var DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
				var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
				var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
				var ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());

				return YY + MM + DD + ' ' + hh + mm + ss;
			},
		},
		components: {
			detailMenu,
			couponModal,
			specModal
		},
		computed: {
			...mapState(['hasLogin', 'downUrl', 'imgSite', 'url'])
		},
		data() {
			return {
				icon: {
					backBtn: "/static/images/common/backBtn.png",
					shareBtn: "/static/images/common/shareBtn.png",
					msgBtn: "/static/images/common/menuBtn.png",

					scroll_backBtn: "/static/images/detail/scroll_returnBtn.png",
					scroll_shareBtn: "/static/images/detail/scroll_shareBtn.png",
					scroll_msgBtn: "/static/images/detail/scroll_msgBtn.png",

					logoBg: "/static/images/specialArea/preGroupArea/logo.png",
					groupNumBg: "/static/images/specialArea/preGroupArea/groupNumBg.png",

					couponBg: "/static/images/detail/coupon_bg.png",
					operatorBtn: "/static/images/detail/operatorBtn.png",
					addressIcon: "/static/images/detail/address_icon.png",
					allJudgeBtn: "/static/images/detail/allJudgeBtn.png",
					starColor: "/static/images/detail/star_color.png",
					starDefault: "/static/images/detail/star_default.png",
					goShopBtn: "/static/images/detail/goShopBtn.png",
					tapSelBtn: "/static/images/detail/tapSelBtn.png",
					sellBtn: "/static/images/detail/sellBtn.png",
					shopBtn: "/static/images/detail/shopBtn.png",
					cartBtn: "/static/images/detail/cartBtn.png",
					left: "/static/images/detail/left.png",
					right: "/static/images/detail/right.png",
					weixin: "/static/images/detail/wechat.png",
					weibo: "/static/images/detail/weibo.png",
					pengyouquan: "/static/images/detail/pengyouquan.png",
					haibao: "/static/images/detail/haibao.png",

					followed: "/static/images/detail/followed.png",
					unFollow: "/static/images/detail/unFollow.png",

					logoApp: "/static/images/detail/logo.png",
					downBg: '/static/images/extension/downBg.png',
					download: '/static/images/extension/download.png',

					splitLinebar: "/static/images/detail/splitLinebar.png"
				},


				//滑动菜单
				opacity: 1,
				scrollTop: 0,
				clickMenuFlag: false,
				currentScrollMenu: "goods",

				statusBar: 0,
				scrollMenu: 0,
				basicArea: 0,
				judgeArea: 0,
				detailArea: 0,


				//详情菜单
				showDetailMenu: false,

				//分享信息
				customerId: "",
				nick_name: "",

				// 商品信息
				id: "",
				goodsDetail: {
					goodsEvaluateEntities: {
						goodsEvaluateData: []
					},
					vendorDto: {},
					goodsCategoryAttr: {}
				},

				// 视频&轮播
				playStatus: false,
				goodsVideo: "",
				goodsPicture: [],
				bannerCurrent: 0,
				banner: {
					indicatorDots: false,
					autoplay: true,
					interval: 3000,
					duration: 500,
					circular: false,
					current: 0
				},

				//秒杀商品
				countDownHour: 0,
				countDownMinute: 0,
				countDownSeconds: 0,

				//拼团预售信息
				preGroupInfo: {},

				//收货地址
				addressIndex: 0,
				addressList: [],
				addressData: null,
				addressStr: "",

				//优惠券窗口
				showCouponModal: false,

				//规格窗口
				buyCount: 1,
				specType: "",
				showSpecModal: false,
				matchingData: {}, //显示规格
				defaultSpecAttr: [], //默认规格
				specSourceArrayList: [], //规格数据
				arrangementCombination: [], //排列组合

				//详情&保障
				contextType: 'goodsDetail',
				detailContent: '',

				//弹框
				type: 'bottom',
				showAddressModal: false,

				//购物车数量
				cartCount: 0,

				//消息数量
				noticeTipCount: 0,

				//推荐商品
				nArray: 0,
				goodsListArray: [],
				goodsListList: [],
				recomSwiperIndex: 0,

				//微信浏览器
				weixinFalg: "",
				detailGoodsId: ""
			};
		},
		onLoad(e) {

			// #ifdef H5
			//微信浏览器标识
			var ua = window.navigator.userAgent.toLowerCase();
			if (ua.match(/MicroMessenger/i) == 'micromessenger') {
				this.weixinFalg = true;
			} else {
				this.weixinFalg = false;
			}

			this.detailGoodsId = "bDetailId="+e.id;


			var btn = document.getElementById('launch-btn');
			if(btn) {
				// btn.setAttribute('extinfo', "id="+e.id);

				let url = this.downUrl;
				btn.addEventListener('error', function (e) {
					uni.showToast({
						title: e.detail,
						icon: "none"
					});

					setTimeout(function(){
						window.location.href = url;
					}, 5000);
				});
			}
			// #endif


			this.id = e.id;
			this.customerId = e.customerId || "";
			this.nick_name = e.nick_name || "";


			//获取签名
			// #ifdef H5

			let that = this;
			that.$api.globalUtil.requestAjax({
				url: '/PayApi/wxPaySignForApi',
				method: 'POST',
				data: {
					// webUrl: encodeURIComponent(window.location.href.split('#')[0])
					webUrl: window.location.href.split('#')[0]
				},
				success: function(res) {

					var appid = res.data.response.appid;
					var timestamp = res.data.response.timestamp;
					var nonceStr = res.data.response.nonceStr;
					var signature = res.data.response.signature;


					/**
					 * 配置信息
					 */
					wx.config({

						// debug: true,

						// 必填，微信appid
						appId: appid,

						// 必填，生成签名的时间戳
						timestamp: timestamp,

						// 必填，生成签名的随机串
						nonceStr: nonceStr,

						// 必填，签名，见附录1
						signature: signature,

						// 必填，需要使用的JS接口列表，所有JS接口列表见附录2
						jsApiList: ['scanQRCode'],

						// 可选，需要使用的开放标签列表，例如['wx-open-launch-app']
						openTagList: ['wx-open-launch-app']
					});

					wx.ready(function() {
						// console.log("准备就绪");
					});

					wx.error(function(res) {
						uni.showToast({
							title: JSON.stringify(res),
							icon: "none"
						});
					});
				}
			});
			// #endif

			//商品详情
			this.getGoodDetail();
		},
		onShow() {

			this.showDetailMenu = false;
			this.showSpecModal = false;

			//地址信息
			if (this.addressData) {
				var addr = this.addressData;
				this.addressStr = addr.province + addr.city + addr.district + addr.address;
			} else {

				if (this.hasLogin) {

					var that = this;
					that.$api.globalUtil.requestAjax({
						url: '/CustomerApi/findCustomerAddressByCustomerIdForApi',
						method: 'POST',
						data: {},
						success: function(res) {

							//地址列表
							that.addressList = res.data.response;

							if (that.addressList.length) {
								var noAddrFlag = true;
								for (var i = 0; i < that.addressList.length; i++) {
									if (that.addressList[i].defaultFlag == 1) {
										noAddrFlag = false;
										that.addressData = that.addressList[i];
										break;
									}
								}

								//未设置默认选择第一个地址
								if (noAddrFlag == true) {
									that.addressData = that.addressList[0];
								}

								var addr = that.addressData;
								that.addressStr = addr.province + addr.city + addr.district + addr.address;
							} else {
								that.addressData = null;
								that.addressStr = "";
							}
						}
					});
				}
			}


			if (this.hasLogin) {
				let that = this;
				this.$api.globalUtil.requestAjax({
					url: '/customerNoticeApi/customerNoticeUnreadCountApi',
					method: 'POST',
					data: {
						cnType: "",
						cnStatus: '0'
					},
					success: function(res) {
						that.noticeTipCount = res.data.response;
					}
				});


				that.$api.globalUtil.requestAjax({
					url: '/ShopCartApi/getShopCartCountForApi',
					method: "POST",
					success: function(res) {
						if (res.data.success) {
							that.cartCount = res.data.response;
						}
					},
				});
			}
		},
		onReady() {

			//状态栏高度
			var statusBar = 0;
			var statusBarQuery = uni.createSelectorQuery();
			statusBarQuery.select('#statusBar-Container').boundingClientRect(data => {
				statusBar = data.height;
				this.statusBar = statusBar;
			}).exec();


			//菜单栏高度
			var scrollMenu = 0;
			var scrollMenuQuery = uni.createSelectorQuery();
			scrollMenuQuery.select('#scrollTopHeight').boundingClientRect(data => {
				scrollMenu = data.height;
				this.scrollMenu = scrollMenu;
			}).exec();
		},
		onPageScroll(e) {

			var that = this;
			if (e.scrollTop >= 176) {
				this.opacity = 0;
			}else {
				this.opacity = 1 - e.scrollTop / 176;
			}
			this.scrollTop = e.scrollTop;

			//是否点击菜单
			if(this.clickMenuFlag) {
				return ;
			}


			//商品区域
			if(that.basicArea == 0) {

				var basicAreaQuery = uni.createSelectorQuery();
				basicAreaQuery.select('#goodsBasicTemp-Container').fields({
					size: true,
					rect: true
				}, data => {
					that.basicArea = data.height;
				}).exec();
			}


			//评价区域
			if(that.judgeArea == 0) {

				var judgeAreaQuery = uni.createSelectorQuery();
				judgeAreaQuery.select('#judgeAreaTemp-Container').fields({
					size: true,
					rect: true
				}, data => {
					that.judgeArea = data.height;
				}).exec();
			}


			var statusBar = this.statusBar;
			var scrollMenu = this.scrollMenu;
			var basicArea = this.basicArea;
			var judgeArea = this.judgeArea;


			//自动切换菜单
			// #ifdef H5
			if((this.scrollTop + (statusBar + scrollMenu) + rpxToPx(20)) <= basicArea) {
				this.currentScrollMenu = 'goods';
				this.clickMenuFlag = false;
			}else if((this.scrollTop + (statusBar + scrollMenu) + 2*rpxToPx(20)) <= (basicArea + judgeArea)) {
				this.currentScrollMenu = 'judge';
				this.clickMenuFlag = false;
			}else {
				this.currentScrollMenu = 'detail';
				this.clickMenuFlag = false;
			}
			// #endif


			// #ifndef H5
			if((this.scrollTop + (scrollMenu) + rpxToPx(20)) <= basicArea) {
				this.currentScrollMenu = 'goods';
				this.clickMenuFlag = false;
			}else if((this.scrollTop + (scrollMenu) + 2*rpxToPx(20)) <= (basicArea + judgeArea)) {
				this.currentScrollMenu = 'judge';
				this.clickMenuFlag = false;
			}else {
				this.currentScrollMenu = 'detail';
				this.clickMenuFlag = false;
			}
			// #endif


			//rpx转px
			function rpxToPx(rpx) {
				 const res = uni.getSystemInfoSync();
				 return (rpx / (750 / res.screenWidth));
			}
		},
		methods: {

			// 显示会员价逻辑
			getShowMemberFlag(goodInfo) {

				var item = goodInfo || this.goodsDetail;

				if(item.customerLevelId
					&& (item.salesStrategy == 10 || item.salesStrategy == 20 || item.salesStrategy == 70)
					&& (item.levelName && item.memberPrice)) {

					return true;
				}else {
					return false;
				}
			},


			//普通浏览器打开APP
			normalBrowserLaunchApp() {

				window.location.href = 'fnwqsg://bDetailId='+this.id;

				let url = this.downUrl;
				setTimeout(function(){
					window.location.href = url;
				}, 5000);
			},


			//滚动菜单位置
			scrollToMenu(menu) {

				if(this.opacity > 0.8) {
					return ;
				}

				var that = this;
				that.clickMenuFlag = true;
				that.currentScrollMenu = menu;


				//商品区域
				if(that.basicArea == 0) {

					var basicAreaQuery = uni.createSelectorQuery();
					basicAreaQuery.select('#goodsBasicTemp-Container').fields({
						size: true,
						rect: true
					}, data => {
						that.basicArea = data.height;
					}).exec();
				}


				//评价区域
				if(that.judgeArea == 0) {

					var judgeAreaQuery = uni.createSelectorQuery();
					judgeAreaQuery.select('#judgeAreaTemp-Container').fields({
						size: true,
						rect: true
					}, data => {
						that.judgeArea = data.height;
					}).exec();
				}


				var statusBar = this.statusBar;
				var scrollMenu = this.scrollMenu;
				var basicArea = this.basicArea;
				var judgeArea = this.judgeArea;


				//滚动位置
				// #ifdef H5
				if(menu == 'goods') {
					uni.pageScrollTo({
						duration: 0,
						scrollTop: 0
					});
					that.clickMenuFlag = false;
				}else if(menu == 'judge') {
					uni.pageScrollTo({
						duration: 0,
						scrollTop: basicArea - (statusBar + scrollMenu) + rpxToPx(20)
					});
					that.clickMenuFlag = false;
				}else if(menu == 'detail') {
					uni.pageScrollTo({
						duration: 0,
						scrollTop: (basicArea + judgeArea) - (statusBar + scrollMenu) + 2*rpxToPx(20)
					});
					that.clickMenuFlag = false;
				}
				// #endif


				// #ifndef H5
				if(menu == 'goods') {
					uni.pageScrollTo({
						duration: 0,
						scrollTop: 0
					});
					that.clickMenuFlag = false;
				}else if(menu == 'judge') {
					uni.pageScrollTo({
						duration: 0,
						scrollTop: basicArea - (scrollMenu) + rpxToPx(20)
					});
					that.clickMenuFlag = false;
				}else if(menu == 'detail') {
					uni.pageScrollTo({
						duration: 0,
						scrollTop: (basicArea + judgeArea) - (scrollMenu) + 2*rpxToPx(20)
					});
					that.clickMenuFlag = false;
				}
				// #endif


				//rpx转px
				function rpxToPx(rpx) {
					 const res = uni.getSystemInfoSync();
					 return (rpx / (750 / res.screenWidth));
				}
			},


			//播放视频操作
			playVideoHandler() {
				this.playStatus = true;
			},
			closeVideoHandler() {
				this.playStatus = false;
			},


			//详情菜单
			toggleMenuListHandler() {
				this.showDetailMenu = !this.showDetailMenu;
			},


			// 返回
			navBack() {
				uni.navigateBack();
			},


			// 推荐人注册
			recommendInfoFilter(callBack) {
				if(!this.hasLogin) {
					if(this.customerId) {
						uni.navigateTo({
							url: '/pagesAccount/extension/invitation?nick_name='+this.nick_name+'&id=' + this.customerId
						});
					}else {
						uni.navigateTo({
							url: '/pagesUser/login/userLogin'
						});
					}
				}else {
					callBack();
				}
			},


			// 弹窗分享
			userShareHandler() {

				var that = this;
				that.recommendInfoFilter(function() {
					that.$nextTick(() => {
						that.$refs['showpopup'].open();
					});
				});
			},
			// 关闭分享弹窗
			cancel() {
				this.$refs['showpopup'].close();
			},
			// 分享
			share(e) {

				//用户信息
				var customerId = "";
				var nick_name = "";
				const tokenInfo = uni.getStorageSync('tokenInfo');
				if (tokenInfo) {
					customerId = JSON.parse(tokenInfo).customerId;
					nick_name = JSON.parse(tokenInfo).nickName;
				}

				let that = this;
				if (e == '0') {
					uni.share({
						provider: "weixin",
						scene: "WXSceneSession",
						type: 0,
						href: that.url + "#/pages/detail/bargain?id=" + that.id + "&customerId="+customerId+"&nick_name="+nick_name,
						title: "构购",
						summary: "我给你分享了一件商品，" + that.goodsDetail.goodsName + '，快来查看',
						imageUrl: that.imgSite + '/s/20210125/37jodmjvvwuk.png',
						success: function(res) {
							that.$refs['showpopup'].close();
						},
						fail: function(err) {
							that.$refs['showpopup'].close();
						}
					});

				} else if (e == '1') {

					uni.share({
						provider: "weixin",
						scene: "WXSenceTimeline",
						type: 0,
						href: that.url + "#/pages/detail/bargain?id=" + that.id + "&customerId="+customerId+"&nick_name="+nick_name,
						title: "构购",
						summary: "我给你分享了一件商品，" + that.goodsDetail.goodsName + '，快来查看',
						imageUrl: that.imgSite + '/s/20210125/37jodmjvvwuk.png',
						success: function(res) {
							that.$refs['showpopup'].close();
						},
						fail: function(err) {
							that.$refs['showpopup'].close();
						}
					});
				} else if (e == '2') {

					uni.share({
						provider: "sinaweibo",
						type: 0,
						href: that.url + "#/pages/detail/bargain?id=" + that.id + "&customerId="+customerId+"&nick_name="+nick_name,
						title: "构购",
						summary: "我给你分享了一件商品，" + that.goodsDetail.goodsName + '，快来查看',
						imageUrl: that.imgSite + '/s/20210125/37jodmjvvwuk.png',
						success: function(res) {
							that.$refs['showpopup'].close();
						},
						fail: function(err) {
							that.$refs['showpopup'].close();
						}
					});
				} else {
					that.$refs['showpopup'].close();
					uni.navigateTo({
						url: '/pages/detail/poster?detailType=detail&id=' + that.id
					});
				}
			},
			// 关闭弹窗
			closeModalHandler() {
				this.showCouponModal = false;
				this.showSpecModal = false;
			},

			// 优惠券弹窗
			showCouponModalHandler() {
				var that = this;
				that.recommendInfoFilter(function() {
					that.showCouponModal = !that.showCouponModal;
				});
			},


			// 规格弹窗
			showSpecModalHandler() {

				var that = this;
				if(that.goodsDetail.isParticipate) {
					that.$api.msg("您已参加过该商品活动!");
				}else {
					this.addActivityNowHandler("bargain");
				}
			},


			// 地址弹窗
			addressDialogHandler() {
				var that = this;
				that.recommendInfoFilter(function() {
					that.$nextTick(() => {
						that.$refs['addressPopup'].open();
					});
				});
			},
			closeAddressPopup() {

				if (this.addressIndex) {
					this.addressData = this.addressList[this.addressIndex];
					var addr = this.addressData;
					this.addressStr = addr.province + addr.city + addr.district + addr.address;
				}
				this.$refs['addressPopup'].close();
			},
			// 跳转新增地址
			addAddress(type, item) {
				let that = this;
				that.$api.globalUtil.methodFilter({
					that: that,
					success: function() {
						uni.navigateTo({
							url: `/pagesUser/address/addressManage?type=${type}&data=${JSON.stringify(item)}`
						});
					}
				});
			},

			// goto评价页
			gotoJudgePage() {
				uni.navigateTo({
					url: "/pagesGoods/evaluate/detail_evaluate?id=" + this.id
				});
			},

			// 进入店铺
			gotoShopPage() {
				uni.navigateTo({
					url: '/pagesGoods/shop/shopDetail?vendorId='+this.goodsDetail.vendorDto.vendorId
				});
			},

			// 进入购物车
			toCart() {
				var that = this;
				that.recommendInfoFilter(function() {
					uni.switchTab({
						url: '/pages/cart/cart'
					});
				});
			},
			checkPic(pic,index2) {
				console.log(index2);
				let that = this;
				uni.previewImage({
					current: pic,
					urls: that.goodsDetail.goodsEvaluateEntities.goodsEvaluateData[index2].img,
					longPressActions: {
						itemList: ['发送给朋友', '保存图片', '收藏'],
						success: function(data) {
							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					}
				});
			},
			// 获取商品详情
			getGoodDetail() {

				let that = this;
				that.$api.globalUtil.requestAjax({
					url: "/GoodsApi/goodsDetailsForApi",
					method: "POST",
					data: {
						goodsCd: that.id
					},
					success: function(res) {
						if (res.data.success) {

							var goodDetail = res.data.response;
							that.goodsDetail = goodDetail;
							that.detailContent = that.$api.globalUtil.formatRichText(goodDetail.gooosContent);
							if (goodDetail.goodsEvaluateEntities.goodsEvaluateData && goodDetail.goodsEvaluateEntities.goodsEvaluateData.length) {
								for(let k of goodDetail.goodsEvaluateEntities.goodsEvaluateData){
									var a = k.img;
									a = a.split(',');
									var b = [];
									for (let i of a) {
										b.push(that.imgSite + i);
									}
									k.img = b;
								}
							}

							//视频&图片
							that.goodsVideo = goodDetail.goodDetail;

							//封面+轮播图
							var goodsPicture = "";
							if(goodDetail.coverPicture) {
								goodsPicture += goodDetail.coverPicture;
							}
							if(goodDetail.goodsPicture) {
								goodsPicture += ("," +goodDetail.goodsPicture + "");
							}
							that.goodsPicture = goodsPicture.split(",");


							//秒杀信息
							var countDown = that.$api.globalUtil.startTimeFormate(goodDetail.activityEndDt);
							that.countDownHour = countDown['hour'];
							that.countDownMinute = countDown['minute'];
							that.countDownSeconds = countDown['seconds'];


							//地址信息
							if (goodDetail.receipts && goodDetail.receipts.length) {

								//地址列表
								that.addressList = goodDetail.receipts;

								var noAddrFlag = true;
								for (var i = 0; i < goodDetail.receipts.length; i++) {
									if (goodDetail.receipts[i].defaultFlag == 1) {
										noAddrFlag = false;
										that.addressData = goodDetail.receipts[i];
										break;
									}
								}

								//未设置默认选择第一个地址
								if (noAddrFlag == true) {
									that.addressData = goodDetail.receipts[0];
								}

								var addr = that.addressData;
								that.addressStr = addr.province + addr.city + addr.district + addr.address;
							}


							//推荐商品
							if (that.goodsDetail.linkGoods && that.goodsDetail.linkGoods.length) {
								that.getRecomGoodsList(that.goodsDetail.linkGoods);
							}


							//原始规格数据
							that.defaultSpecAttr = [];
							that.specSourceArrayList = [];
							that.arrangementCombination = [];
							that.specFormatAndArrangeCombin(goodDetail.goodsDetails);
						} else {
							that.$api.msg(res.data.msg || "获取商品详情失败");
						}
					}
				});
			},


			//规格数据格式化&排列组合
			specFormatAndArrangeCombin(specSourceArrayList) {

				var that = this;

				//排列组合数据
				var arrangementCombination = [];


				//格式化&排列组合属性
				var specKeysValues = {};
				for (var i = 0; i < specSourceArrayList.length; i++) {
					var specJson = JSON.parse(specSourceArrayList[i].goodsCategoryAttr);

					var oneSpecArr = [];
					for (var j = 0; j < specJson.length; j++) {

						//格式化规格属性
						oneSpecArr.push(specJson[j].value);

						//排列组合规格
						var key = "" + specJson[j].key;
						var value = "" + specJson[j].value;
						if (!specKeysValues.hasOwnProperty(key)) {
							specKeysValues[key] = {};
						}
						specKeysValues[key][value] = "";
					}
					specSourceArrayList[i].attributeStr = oneSpecArr.join(",");

					//默认规格
					if (specSourceArrayList[i].defaultAttrFlag == 1) {
						that.defaultSpecAttr = specJson;
						that.matchingData = specSourceArrayList[i];
					}
				}

				this.specSourceArrayList = specSourceArrayList;
				// console.log("格式化数据:");
				// console.log(JSON.stringify(this.specSourceArrayList));


				//排列组合数据
				var specKeysArray = Object.keys(specKeysValues);
				for (var i = 0; i < specKeysArray.length; i++) {

					var specKeyObj = {};
					specKeyObj.name = specKeysArray[i];
					specKeyObj.list = [];

					var specValuesArr = Object.keys(specKeysValues[specKeysArray[i]]);
					for (var j = 0; j < specValuesArr.length; j++) {
						specKeyObj.list.push({
							name: specValuesArr[j]
						});
					}
					arrangementCombination.push(specKeyObj);
				}

				this.arrangementCombination = arrangementCombination;
				// console.log("排列组合:");
				// console.log(JSON.stringify(this.arrangementCombination));


				// console.log("默认数据");
				// console.log(JSON.stringify(this.defaultSpecAttr));

				// console.log("默认规格："+JSON.stringify(that.matchingData));
			},


			// change规格
			changeSpecHandler(params) {
				this.matchingData = params.matchingData;
				this.defaultSpecAttr = JSON.parse(params.matchingData.goodsCategoryAttr);
			},


			//规格确定
			sureOperateHandler(params) {

				//发起砍价
				var that = this;
				that.$api.globalUtil.requestAjax({
					url: "/ActivityApi/sendBargainApi",
					method: "POST",
					data: {
						activityGoodsId: params.matchingData.activityGoodsId
					},
					success: function(res) {
						if(res.data.success) {
							uni.navigateTo({
								url: "/pagesGoods/specialArea/bargainArea/bargainDetail?firstFlag=1&bargainId="+res.data.response.bargainId
							});
						}
					},
				});
			},


			//轮播&视频
			bannerSwiperChange(e) {
				console.log(e.detail.current);
				this.bannerCurrent = e.detail.current;
			},


			//广告详情
			looKDetail() {
				return;
			},


			//商品详情&售后保障
			changeContextType(type) {
				this.contextType = type;
				if (type == 'goodsDetail') {
					this.detailContent = this.$api.globalUtil.formatRichText(this.goodsDetail.gooosContent);
				} else if (type == 'afterSale') {
					this.detailContent = this.$api.globalUtil.formatRichText(this.goodsDetail.afterSaleWarranty['rDetails']);
				}
			},


			// 发起砍价
			addActivityNowHandler(type) {

				var that = this;
				if(that.goodsDetail.isParticipate) {
					that.$api.msg("您已参加过该商品活动!");
				}else {

					var that = this;
					that.recommendInfoFilter(function() {
						that.showSpecModal = true;
						that.specType = type;
						that.$refs.specModalChild.initDefaultSpecHandler();
					});
				}
			},


			// 关注/取消
			followOrCancelGoods(id) {

				var that = this;
				that.recommendInfoFilter(function() {
					that.$api.globalUtil.requestAjax({
						url: "/customerAttentionApi/customerAttentionApi",
						method: "POST",
						data: {
							caId: that.id,
							caType: 0 //收藏类型 0商品、1商家
						},
						success: function(res) {
							if (res.data.success) {
								that.goodsDetail.isAttention = !that.goodsDetail.isAttention;
							}
						}
					});
				});
			},


			//注册购买&下载APP
			gotoRegisterAccount() {
				var that = this;
				var sharedGoodsCd = this.id;
				uni.navigateTo({
					url: '/pagesAccount/extension/invitation?nick_name='+this.nick_name+'&id=' + this.customerId + '&sharedGoodsCd=' + sharedGoodsCd
				});
			},
			gotoDownloadApp() {

				let that = this;
				let url = that.downUrl;
				window.location.href = url;
			},


			//咨询
			gotoContactSell() {
				this.$api.globalUtil.gotoContactSell();
			},


			//推荐商品
			getRecomGoodsList(goodsList) {
				var that = this;
				that.goodsListList = goodsList;

				let n = 3;
				let resLength = that.goodsListList.length;
				let arrLength = resLength % n == 0 ? resLength / n : parseInt(resLength / n) + 1;

				let goodsListArray = [];
				for (var i = 0; i < arrLength; i++) {
					goodsListArray.push(i);
				}
				that.goodsListArray = goodsListArray;

				let nArray = [];
				for (var i = 0; i < n; i++) {
					nArray.push(i);
				}
				that.nArray = nArray;
			},


			//推荐商品分页
			recomBannerSwiperChange(e) {
				this.recomSwiperIndex = e.detail.current;
			},


			//商品详情
			gotoDetail(activityType, id) {
				// 2：秒杀活动 5：砍价 6：拼团预售
				if(activityType) {
					if(activityType == 2) {
						uni.navigateTo({
							url: '/pages/detail/seckill?id=' + id
						});
					}
					if(activityType == 5) {
						uni.navigateTo({
							url: '/pages/detail/bargain?id=' + id
						});
					}
					if(activityType == 6) {
						uni.navigateTo({
							url: '/pages/detail/preGroup?id=' + id
						});
					}
				}else {
					uni.navigateTo({
						url: '/pages/detail/detail?id=' + id
					});
				}
			},


			//购物车数量
			setTabBarBadge() {

				var that = this;
				that.recommendInfoFilter(function() {
					that.$api.globalUtil.requestAjax({
						url: '/ShopCartApi/getShopCartCountForApi',
						method: "POST",
						success: function(res) {
							if (res.data.success) {
								that.cartCount = res.data.response > 99 ? '99+' : res.data.response+'';
							}
						},
					});
				});
			}
		}
	};
</script>

<style lang="less">
	page {
		background-color: #f9f9f9;
	}

	.scrollHidden {
		overflow-y: hidden;
	}


	/* 轮播图 */
	.swiper-Container {
		position: relative;
		width: 100%;
		height: 750rpx;
	}

	.body .banner {
		overflow: hidden;
		height: 100%;
	}

	.banner image {
		width: 100%;
		height: 100%;
	}

	.video-swiper video {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
	}

	.video-swiper video cover-image,
	.video-swiper .playVideo-icon {
		position: absolute;
		top: 50%;
		left: 50%;
		margin-left: -55rpx;
		margin-top: -55rpx;
		width: 110rpx;
		height: 110rpx;
	}

	/* 显示序号 */
	.showNO-Container {
		position: absolute;
		right: 30rpx;
		bottom: 30rpx;
		padding: 0 20rpx;
		height: 46rpx;
		line-height: 46rpx;
		font-size: 22rpx;
		font-family: PingFang SC;
		/* font-weight:500; */
		color: rgba(255, 255, 255, 1);
		background: rgba(0, 0, 0, 1);
		border: 1px solid rgba(255, 255, 255, 1);
		opacity: 0.3;
		border-radius: 23px;
	}


	/* 基础信息 */
	.basicInfo-Container {
		position: relative;
		padding: 10rpx 30rpx 34rpx 30rpx;
		width: 750rpx;
		background: rgba(255, 255, 255, 1);
		border-radius: 0px 0px 16rpx 16rpx;
		box-shadow: 0px 4rpx 8rpx 0px rgba(171,171,171,0.1);

		.priceCount {
			position: relative;
			box-sizing: border-box;
			display: inline-block;
			// padding: 0 32rpx;
			width: 100%;
			height: 50rpx;

			.money-icon {
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: rgba(210, 23, 40, 1);
			}

			.price-int {
				font-size: 46rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: rgba(210, 23, 40, 1);
			}

			.price-float {
				font-size: 30rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: rgba(210, 23, 40, 1);
			}

			.oldPrice {
				margin-left: 21rpx;
				font-size: 26rpx;
				font-family: PingFang SC;
				// font-weight:500;
				text-decoration: line-through;
				color: rgba(153, 153, 153, 1);
			}

			.sellCount {
				position: absolute;
				bottom: 0;
				right: 0rpx;
				height: 26rpx;
				line-height: 26rpx;
				font-size: 26rpx;
				font-family: PingFang SC;
				color: rgba(102, 102, 102, 1);
			}

			.plus {
				margin-left: 20rpx;
				margin-right: 20rpx;
				font-size: 40rpx;
				color: #E01327;
			}

			.points {
				font-size: 24rpx;
				color: #E01327;
			}
		}

		.goodNameFollow-Container {
			display: flex;
			align-items: center;
			margin-top: 20rpx;

			.goodName {
				margin-top: 20rpx;
				max-width: 560rpx;
				line-height: 40rpx;
				font-size: 30rpx;
				font-family: PingFang SC;
				// font-weight:bold;
				color: rgba(51, 51, 51, 1);
			}
		}

		.goodDesc {
			margin-top: 25rpx;
			width: 100%;
			// height:25rpx;
			line-height: 40rpx;
			font-size: 26rpx;
			font-family: PingFang SC;
			// font-weight:500;
			color: rgba(153, 153, 153, 1);
		}


		//发货信息
		.preGroupCount-Container {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 20rpx;

			.sendTime {
				font-size:26rpx;
				color:rgba(122,70,223,1);
			}

			.buyCount-Container {
				display: flex;
				flex-direction: column;

				.buyCount {
					text-align: right;
					font-size:20rpx;
					color:#333333;
				}

				.processBar {
					margin-top: 4rpx;
					width:200rpx;
					height:16rpx;
					background:#E6E6E6;
					border-radius:8rpx;

					.process {
						height:16rpx;
						background:#7A46DF;
						border-radius:8rpx;
					}
				}
			}
		}
	}
	.groupCond-Container {
		padding: 30rpx 34rpx;
		background-color: #FFFFFF;

		.attendMethod-Container {
			display: flex;
			flex-direction: column;
			margin-bottom: 20rpx;

			.methodInfo {
				display: flex;
				align-items: center;

				.methodTitle {
					font-size:24rpx;
					color:#333333;
				}
				.methodValue {
					display: flex;
					align-items: center;
					position: relative;
					margin-left: 24rpx;
					width: 118rpx;
					height: 30rpx;
					font-size: 24rpx;
					color: #333333;

					.groupNumBg {
						position: absolute;
						top: 0;
						left: 0;
						width: 118rpx;
						height: 30rpx;
						line-height: 30rpx;
					}
					.groupNumText {
						position: absolute;
						top: 0;
						right: 0;
						width: 76rpx;
						text-align: center;
						font-size:20rpx;
						color: #7A46DF;
					}
				}
			}

			.methodTips {
				text-indent: 4em;
				margin-left: 24rpx;
				margin-top: 10rpx;
				font-size: 24rpx;
				color: #999999;

				.groupNumTip {
					color: #DC0E49;
				}
			}
		}
	}



	/* 商品信息块 */
	.detailBlock-Container {
		margin-top: 20rpx;
		padding: 36rpx 30rpx;
		width: 100%;
		background: rgba(255, 255, 255, 1);
		border-radius: 10rpx;

		.oneRow {
			display: flex;
			align-items: center;

			.title {
				width: 90rpx;
				height: 32rpx;
				line-height: 32rpx;
				text-align: left;
				font-size: 24rpx;
				font-family: PingFang SC;
				// font-weight:500;
				color: rgba(102, 102, 102, 1);
			}

			.subTitle {
				margin-right: 40rpx;
				width: 53rpx;
				height: 32rpx;
				line-height: 32rpx;
				background: rgba(255, 231, 233, 1);
				border-radius: 3rpx;
				text-align: center;
				font-size: 20rpx;
				font-family: PingFang SC;
				// font-weight:500;
				color: rgba(210, 23, 40, 1);
			}

			.content {
				max-width: 515rpx;
				font-size: 24rpx;
				color: rgba(51, 51, 51, 1);
			}

			.operatorBtn {
				margin-left: auto;
				width: 34rpx;
				height: 10rpx;
			}
		}
	}


	//参与拼团预售
	.hadGrouped-Container {
		margin-top: 20rpx;
		padding: 0 30rpx;
		border-radius: 10rpx;
		background-color: #FFFFFF;

		.header-Container {
			display: flex;
			align-items: center;
			position: relative;
			width: 100%;
			height: 84rpx;
			line-height: 84rpx;
			font-size: 28rpx;
			color: rgba(51, 51, 51, 1);

			.preGroupText {
				font-size: 28rpx;
			}

			.all-Container {
				margin-left: auto;
				text-align: right;

				.text {
					font-size: 24rpx;
					color: #999999;
					line-height: 29rpx;
				}

				image {
					margin-left: 15rpx;
					width: 11rpx;
					height: 19rpx;
				}
			}
		}

		.onePreGroup {
			display: flex;
			align-items: center;
			height: 100rpx;

			&.borderOneRpx::after {
				border-bottom: 0;
				border-left: 0;
				border-right: 0;
				border-color: #EEEEEE;
			}

			.userAvatar {
				width:50rpx;
				height:50rpx;
				background:rgba(255,255,255,1);
				border:1rpx solid rgba(210,23,40,1);
				border-radius:50%;
			}

			.userName {
				margin-left: 26rpx;
				font-size: 28rpx;
				color: #333333;
			}

			.toGroupInfo {
				margin-left: auto;
				margin-right: 148rpx;
				font-size: 28rpx;
				color: #666666;
			}

			.attendGroupBtn {
				z-index: 9;
				position: absolute;
				right: 0;
				margin-left: 28rpx;
				width:121rpx;
				height:50rpx;
				line-height: 50rpx;
				text-align: center;
				font-size:24rpx;
				color: #FFFFFF;
				background:linear-gradient(-45deg,rgba(147,20,255,1) 0%,rgba(165,27,254,1) 100%);
				border-radius:8rpx;
			}
		}
	}


	/* 优惠券&赠品 */
	.couponGift-Container {

		.oneRow:nth-of-type(2) {
			align-items: flex-start;
			margin-top: 40rpx;
		}

		.coupon-Container {
			display: flex;
			flex-wrap: wrap;
			overflow: hidden;
			max-width: 450rpx;
			height: 32rpx;

			.coupon-item {
				position: relative;
				margin-right: 17rpx;
				padding: 0 20rpx;
				height: 32rpx;
				line-height: 32rpx;
				background: rgba(255, 255, 255, 1);

				&.borderOneRpx:after {
					border-color: rgba(210, 23, 40, 1);
					border-radius: 5rpx;
				}

				.amount {
					height: 100%;
					line-height: 32rpx;
					text-align: center;
					font-size: 20rpx;
					color: rgba(210, 23, 40, 1);
				}
			}
		}

		.gift-Container {
			flex-direction: column;
			font-size: 24rpx;
			color: rgba(51, 51, 51, 1);

			.gift-item {
				margin-top: 20rpx;
				max-width: 475rpx;

				&:first-of-type {
					margin-top: 0;
				}
			}
		}
	}


	/* 规格&运费 */
	.specExpenses-Container {
		padding: 0 30rpx;

		.oneRow {
			position: relative;
			height: 102rpx;

			&.borderOneRpx::after {
				border-top: 0;
				border-left: 0;
				border-right: 0;
				border-color: #EEEEEE;
			}
		}

		.addressContent {
			display: flex;
			align-items: center;

			.addressIcon {
				width: 20rpx;
				height: 24rpx;
			}

			.addressText {
				flex: 1;
				margin-left: 11rpx;
			}
		}
	}


	/* 评价区域 */
	.judgeArea-Container {
		margin-top: 20rpx;
		padding: 36rpx 30rpx 0 30rpx;
		border-radius: 10rpx;
		background-color: #FFFFFF;

		.header-Container {
			display: flex;
			align-items: center;
			position: relative;
			width: 100%;
			height: 26rpx;
			font-size: 28rpx;
			font-family: PingFang SC;
			color: rgba(51, 51, 51, 1);

			.judgeText {
				font-weight: bold;
				font-size: 28rpx;
			}

			.judgeCount {
				margin-left: 10rpx;
				font-weight: bold;
				font-size: 22rpx;
			}

			.all-Container {
				margin-left: auto;
				text-align: right;

				.text {
					font-size: 24rpx;
					font-family: PingFang SC;
					color: rgba(102, 102, 102, 1);
					line-height: 29rpx;
				}

				image {
					margin-left: 15rpx;
					width: 11rpx;
					height: 19rpx;
				}
			}
		}

		.judgeList-Container {
			.judge-item {
				position: relative;
				margin-top: 36rpx;
				padding-bottom: 36rpx;

				&.borderOneRpx:after {
					border-top: 0;
					border-left: 0;
					border-right: 0;
					border-color: #EEEEEE;
				}

				.userInfo {
					display: flex;
					width: 100%;
					height: 70rpx;

					.profilePhoto {
						width: 70rpx;
						height: 70rpx;
						border-radius: 50%;
					}

					.nameStar {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						margin-left: 24rpx;
						padding: 5rpx 0 10rpx 0;
						max-width: 575rpx;

						.userName {
							max-width: 550rpx;
							font-size: 24rpx;
							font-family: PingFang SC;
							// font-weight:500;
							color: rgba(51, 51, 51, 1);
						}

						.star-Container {
							display: flex;
							height: 20rpx;

							.starIcon {
								margin-right: 8rpx;
								width: 22rpx;
								height: 20rpx;
							}
						}
					}
				}

				.judgeContent {
					margin-top: 20rpx;
					line-height: 31rpx;
					font-size: 24rpx;
					font-family: PingFang SC;
					// font-weight:500;
					color: rgba(51, 51, 51, 1);
				}

				.judgeImages {
					justify-content: space-between;
					display: flex;
					flex-wrap: wrap;
					margin-top: 28rpx;

					image {
						margin-bottom: 18rpx;
						width: 150rpx;
						height: 150rpx;
						border-radius: 10rpx;
					}
				}

				.judgeSpec {
					// margin-top: 25rpx;
					max-width: 100%;
					line-height: 31rpx;
					font-size: 20rpx;
					font-family: PingFang SC;
					// font-weight:500;
					color: rgba(153, 153, 153, 1);
				}
			}
		}

		//店铺回复
		.splitLinebar {
			margin: 0 auto;
			width: 690rpx;
			height: 11rpx;
		}

		.shopReplay {
			position: relative;
			padding: 10rpx 0 0 0;
			font-size: 22rpx;
			font-family: PingFang SC;
			// font-weight:500;
			color: rgba(153, 153, 153, 1);
			line-height: 31rpx;

			&.borderOneRpx::after {
				border-bottom: 0;
				border-left: 0;
				border-right: 0;
				border-color: #EEEEEE;
			}
		}
	}


	/* 店铺信息 */
	.shopInfo-Container {
		margin-top: 20rpx;
		padding: 0 30rpx 24rpx 30rpx;
		width: 100%;
		// height: 660rpx;
		border-radius: 10rpx;
		background: rgba(255, 255, 255, 1);

		.shopInfo {
			display: flex;
			position: relative;
			padding-top: 30rpx;
			width: 100%;
			height: 180rpx;

			.shopPhoto {
				width: 120rpx;
				height: 120rpx;
				border-radius: 10rpx;
			}

			.rightInfo {
				position: relative;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				margin-left: 38rpx;
				width: 520rpx;
				height: 120rpx;

				.shopNameType {
					display: flex;
					align-items: center;

					.shopName {
						max-width: 450rpx;
						// line-height: 29rpx;
						font-size: 32rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: rgba(51, 51, 51, 1);
					}

					.shopType {
						margin-left: 17rpx;
						width: 57rpx;
						height: 30rpx;
						line-height: 30rpx;
						background: rgba(210, 23, 40, 1);
						border-radius: 3rpx;
						text-align: center;
						font-size: 22rpx;
						font-family: PingFang SC;
						// font-weight:500;
						color: rgba(255, 255, 255, 1);


						&.borderOneRpx::after {
							border-top: 0;
							border-left: 0;
							border-right: 0;
							border-color: #D21728;
						}
					}
				}

				.star-Container {
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 0 10rpx;
					width: 144rpx;
					height: 34rpx;
					background: rgba(219, 219, 219, 0.5);
					border-radius: 17rpx;

					.starIcon {
						width: 22rpx;
						height: 20rpx;
					}
				}

				.attention-Container {
					line-height: 29rpx;
					font-size: 24rpx;
					font-family: PingFang SC;
					// font-weight:500;
					color: rgba(51, 51, 51, 1);
				}

				.gotoShopPage {
					position: absolute;
					right: 0;
					bottom: 0;
					width: 148rpx;
					height: 54rpx;
					line-height: 54rpx;
					text-align: center;
					font-size: 26rpx;
					font-family: PingFang SC;
					color: rgba(210, 23, 40, 1);

					image {
						position: absolute;
						top: 0;
						left: 0;
						width: 100%;
						height: 100%;
					}
				}
			}
		}

		//推荐商品
		.remomendGoods-Container {

			&.borderOneRpx:after {
				border-bottom: 0;
				border-left: 0;
				border-right: 0;
				border-color: #EEEEEE;
			}

			.title {
				height: 72rp;
				line-height: 72rpx;
				font-size: 23rpx;
				font-family: PingFang SC;
				// font-weight:500;
				color: rgba(102, 102, 102, 1);
			}

			.goodsList-Container {
				z-index: 9;
				position: relative;
				width: 690rpx;
				// height: 410rpx;

				swiper,
				.swiper-item {
					display: flex;
					justify-content: space-between;
					width: 100%;
					height: 352rpx;

					.good-item {
						display: flex;
						flex-direction: column;
						justify-content: space-between;
						position: relative;
						width: 226rpx;
						height: 352rpx;
						background: rgba(255, 255, 255, 1);
						box-shadow: 0px 3rpx 6rpx 0px rgba(169, 169, 169, 0.08);
						border: 1rpx solid #eee;
						border-radius: 10rpx;

						&.hideIndexN {
							visibility: hidden;
						}

						// &.borderOneRpx:after {
						// 	border-color: rgba(238,238,238,1);
						// 	border-radius:10rpx;
						// }

						.goodImage {
							width: 224rpx;
							height: 224rpx;
							border-radius: 10rpx 10rpx 0 0;
						}

						.goodNameType {
							margin-left: 12rpx;
							margin-bottom: auto;
							max-width: 196rpx;
							height: auto;
							line-height: 28rpx;

							.goodName {
								font-size: 22rpx;
								font-family: PingFang SC;
								// font-weight:500;
								color: rgba(51, 51, 51, 1);
							}

							.goodType {
								display: inline-block;
								margin-right: 8rpx;
								width: 55rpx;
								height: 24rpx;
								line-height: 24rpx;
								background: rgba(210, 23, 40, 1);
								border-radius: 3rpx;
								text-align: center;
								font-size: 20rpx;
								font-family: PingFang SC;
								// font-weight:500;
								color: rgba(255, 255, 255, 1);

								&.borderOneRpx::after {
									border-top: 0;
									border-left: 0;
									border-right: 0;
									border-color: #D21728;
								}
							}
						}

						.priceCount {
							display: flex;
							align-items: flex-end;
							position: relative;
							padding: 0 10rpx 20rpx 10rpx;
							box-sizing: border-box;
							width: 100%;
							height: 50rpx;

							text {
								line-height: 26rpx;
								font-size: 20rpx;
								font-family: PingFang SC;
								// font-weight: 500;
								color: rgba(210, 23, 40, 1);
							}

							.money-icon {
								margin-left: 10rpx;
								font-size: 20rpx;
								line-height: 20rpx;
								font-family: PingFang SC;
								// font-weight: 500;
								color: rgba(210, 23, 40, 1);
							}

							.price-int {
								line-height: 26rpx;
								font-size: 20rpx;
								font-family: PingFang SC;
								// font-weight: 500;
								color: rgba(210, 23, 40, 1);
							}

							.price-float {
								line-height: 20rpx;
								font-size: 20rpx;
								font-family: PingFang SC;
								// font-weight: 500;
								color: rgba(210, 23, 40, 1);
							}

							.oldPrice {
								line-height: 20rpx;
								margin-left: auto;
								display: inline-block;
								font-size: 20rpx;
								font-family: PingFang SC;
								text-decoration: line-through;
								color: rgba(153, 153, 153, 1);
							}
						}
					}
				}

				//分页
				.pages-Container {
					display: flex;
					align-items: center;
					justify-content: center;
					width: 100%;
					height: 55rpx;

					.one-page {
						margin-right: 7rpx;
						width: 8rpx;
						height: 8rpx;
						background: linear-gradient(135deg, rgba(209, 4, 152, 1) 0%, rgba(210, 23, 40, 1) 100%);
						opacity: 0.3;
						border-radius: 50%;

						&.current {
							width: 21rpx;
							height: 8rpx;
							background: linear-gradient(135deg, rgba(209, 4, 152, 1) 0%, rgba(210, 23, 40, 1) 100%);
							border-radius: 4rpx;
							opacity: 1;
						}
					}
				}
			}
		}
	}


	/* 详情&保障 */
	.detailSafeguard-Container {
		margin-top: 20rpx;
		padding-bottom: 125rpx;
		padding-bottom: calc(125rpx + constant(safe-area-inset-bottom));
		padding-bottom: calc(125rpx + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, 1);
		border-radius: 10rpx 10rpx 0px 0px;

		.headerTap-Container {
			display: flex;
			padding: 0 30rpx;
			width: 100%;
			height: 95rpx;

			.tap {
				display: flex;
				align-items: center;
				justify-content: center;
				position: relative;
				margin: 0 auto;
				width: 50%;
				height: 100%;

				&.borderOneRpx::after {
					top: 20rpx;
					height: 120rpx;
					border-top: 0;
					border-left: 0;
					border-bottom: 0;
					border-color: #EEEEEE;
				}

				image {
					margin: 0 15rpx;
					width: 40rpx;
					height: 15rpx;
				}

				.tapName {
					line-height: 95rpx;
					text-align: center;
					font-size: 26rpx;
					font-family: PingFang SC;
					font-weight: 500;
					color: rgba(51, 51, 51, 1);

					&.currentTap {
						color: rgba(224, 19, 39, 1);
					}
				}
			}
		}

		.detailContent {
			padding: 0 30rpx;
		}
	}


	/* 底部菜单 */
	.controller-bar {

		.menu-button {
			display: flex;
			flex-direction: column;
			align-items: center;
			width: 50px;
		}
	}

	.controller-bar .flex1-center {
		height: 100%;
		justify-content: center;
		position: relative;
	}

	.controller-bar .flex1-center image {
		width: 44rpx;
		height: 44rpx;
		margin-top: 12rpx;
	}

	.controller-bar .flex1-center text {
		white-space: nowrap;
		font-size: 20rpx;
		font-family: PingFang SC;
		// font-weight:500;
		color: rgba(51, 51, 51, 1);
		line-height: 40rpx;
	}

	.controller-bar .btn-group {
		display: flex;
		justify-content: space-between;
		margin-right: 30rpx;

		.addActivityBtn {
			width: 378rpx;
			height:70rpx;
			line-height: 70rpx;
			text-align: center;
			font-size: 24rpx;
			color: #FFFFFF;
			background:linear-gradient(-45deg,rgba(236,85,56,1) 0%,rgba(241,101,40,1) 100%);
			border-radius:35rpx;
		}
	}


	// 分享
	.share {
		width: 100%;
		height: 486rpx;
		border-radius: 16rpx 16rpx 0 0;
		background-color: white;
		z-index: 1000;
		position: relative;

		.title-name {
			height: 126rpx;
			width: 100%;
			font-size: 30rpx;
			color: #333333;
			font-weight: bold;
		}

		image {
			width: 168rpx;
			height: 16rpx;
			margin: 0 35rpx 0 35rpx;
		}

		.icons {
			width: 690rpx;
			margin: 24rpx auto 0 auto;
			border-bottom: 1rpx solid#eee;
			padding-bottom: 74rpx;

			.icon-block {
				width: 120rpx;
				font-size: 26rpx;
				color: #333333;
				flex-wrap: wrap;

				image {
					flex-shrink: 0;
					width: 110rpx;
					height: 110rpx;
				}

				text {
					margin-top: 24rpx;
				}
			}
		}

		.cancel {
			color: #999999;
			font-size: 30rpx;
			margin-top: 27rpx;
			width: 100%;
			text-align: center;
		}
	}


	// 限制APP购买
	.limitAppBuy-Container {
		z-index: 99999;
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		bottom: 0;
		bottom: calc(constant(safe-area-inset-bottom));
		bottom: calc(env(safe-area-inset-bottom));
		width: 100%;
		height: 110rpx;
		background: rgba(231, 36, 57, 1);


		//注册购买
		.logoApp {
			position: absolute;
			left: 24rpx;
			width: 127rpx;
			height: 110rpx;
		}
		.buyDesc {
			position: absolute;
			left: 80rpx;
			margin-left: 13rpx;
			height: 110rpx;
			line-height: 110rpx;
			font-size: 30rpx;
			color: rgba(255, 255, 255, 1);
		}
		.registerBuy {
			position: absolute;
			right: 40rpx;
			width:136rpx;
			height:50rpx;
			line-height: 50rpx;
			text-align: center;
			font-size:22rpx;
			color:rgba(231,36,57,1);
			background:rgba(255,255,255,1);
			box-shadow:0px 3rpx 6rpx 0px rgba(68,68,68,0.3);
			border-radius:25rpx;
		}


		//下载App
		.downBg {
			position: absolute;
			width: 100%;
			height: 100%;
		}
		.down-content {
			display: flex;
			align-items: center;
			justify-content: center;
			position: absolute;
			width: 100%;
			height: 100%;

			.downIcon {
				width: 30rpx;
				height: 30rpx;
			}
			.downDesc {
				margin-left: 13rpx;
				height: 110rpx;
				line-height: 110rpx;
				font-size: 30rpx;
				font-family: PingFang SC;
				color: #e01228;
			}
		}
	}


	// 购物车数量
	.cartCount-Container {
		position: absolute;
		top: 10rpx;
		right: 10rpx;
		width: 36rpx;
		height: 26rpx;
		line-height: 26rpx;
		background: rgba(224, 18, 43, 1);
		box-shadow: 0px 1rpx 4rpx 0px rgba(68, 68, 68, 0.2);
		border-radius: 13rpx;
		text-align: center;
		font-size: 22rpx;
		font-family: PingFang SC;
		color: rgba(255, 255, 255, 1);
	}


	// 选择地址弹窗
	.addressPopup-content {
		background-color: white;
		width: 100%;
		padding-bottom: 200rpx;
		border-radius: 16rpx 16rpx 0 0;

		.title {
			padding-top: 50rpx;
			height: 119rpx;
			width: 100%;
			text-align: center;
			font-size: 30rpx;
			color: #333;
			font-weight: bold;
			position: relative;

			image {
				width: 25rpx;
				height: 24rpx;
				position: absolute;
				top: 36rpx;
				right: 36rpx;
			}
		}

		scroll-view {
			height: 600rpx;
			width: 100%;

			.address {
				// height: 60rpx;
				width: 100%;
				display: flex;
				align-items: center;
				margin-top: 49rpx;

				.left {
					display: flex;
					align-items: center;
					width: 91rpx;
					padding-left: 50rpx;

					.select {
						width: 22rpx;
						height: 16rpx;
						margin-top: auto;
					}

					.address_img {
						width: 20rpx;
						height: 25rpx;
						margin-top: auto;

					}
				}

				.right {
					width: 659rpx;
					color: #666;
					font-size: 24rpx;
					padding-right: 70rpx;
					// display: flex;
					// align-items: center;
				}
			}
		}

		.add-btn {
			z-index: 95;
			display: flex;
			align-items: center;
			justify-content: center;
			width: 600rpx;
			height: 90rpx;
			font-size: 33rpx;
			color: #fff;
			background: linear-gradient(135deg, rgba(210, 23, 40, 1) 0%, rgba(209, 4, 152, 1) 100%);
			border-radius: 45rpx;
			margin-top: 80rpx;
		}
	}
	.open-plus{
		position: fixed;
		z-index: 20;
		top: 200rpx;
		right: 0;
		background-color: rgb(231,36,57);
		font-size: 30rpx;
		color: white;
		height: 70rpx;
		width: 180rpx;
		border-radius: 35rpx 0 0 35rpx;
	}


	// 状态栏占位
	.statusBar-Container {
		z-index: 9999;
		position: fixed;
		top: 0;
		height: calc(var(--status-bar-height));
		background-color: #FFFFFF;
	}


	/**
	 * header按钮栏
	 */
	.headerBtns-Container {
		z-index: 8;
		position: fixed;
		top: 0;
		display: flex;
		align-items: flex-end;
		box-sizing: border-box;
		width: 100%;

		/* #ifdef H5 */
		height: 88rpx !important;
		/* #endif */

		/* #ifdef APP-PLUS */
		height: calc(var(--status-bar-height) + 88rpx) !important;
		/* #endif */

		/* #ifdef MP-WEIXIN */
		height: calc(var(--status-bar-height) + 176rpx) !important;
		/* #endif */


		.menus-Container {
			z-index: 2;
			display: flex;
			align-items: center;
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 88rpx;

			.backBtn {
				margin-left: 28rpx;
				width: 57rpx;
				height: 56rpx;
			}
			.shareBtn {
				margin-left: auto;
				margin-right: 34rpx;
				width: 57rpx;
				height: 56rpx;
			}
			.menuBtn {
				margin-right: 40rpx;
				width: 56rpx;
				height: 56rpx;
			}
		}
	}


	// 顶部菜单
	.scrollHeader-Container {
		z-index: 99;
		display: flex;
		align-items: flex-end;
		box-sizing: border-box;
		position: fixed;
		top: 0;
		width: 100%;
		box-shadow:0px 0px 1px 0px rgba(0, 0, 0, 0.2);
		background-color: #FFFFFF;

		/* #ifdef H5 */
		height: 88rpx !important;
		/* #endif */

		/* #ifdef APP-PLUS */
		height: calc(var(--status-bar-height) + 88rpx) !important;
		/* #endif */

		/* #ifdef MP-WEIXIN */
		height: calc(var(--status-bar-height) + 176rpx) !important;
		/* #endif */


		.menus-Container {
			z-index: 2;
			display: flex;
			align-items: center;
			position: absolute;
			bottom: 0;
			width: 100%;
			height: 88rpx;

			.backBtn {
				margin-left: 28rpx;
				width: 56rpx;
				height: 56rpx;
			}
			.shareBtn {
				margin-left: auto;
				margin-right: 34rpx;
				width: 56rpx;
				height: 56rpx;
			}
			.menuBtn {
				margin-right: 40rpx;
				width: 56rpx;
				height: 56rpx;
			}
		}


		.threeMenus-Container {
			z-index: 3;
			position: absolute;
			bottom: 0;
			display: flex;
			justify-content: center;
			left: 50%;
			transform: translateX(-50%);
			// width: 100%;
			height: 88rpx;
			line-height: 88rpx;
			font-size: 28rpx;
			font-family: PingFang SC;
			color: rgb(102, 102, 102);

			.oneMenu {
				margin: 0 12rpx;

				&.currentMenu {
					position: relative;
					color: #333333;
				}
				&.currentMenu:after{
					content: '';
					position: absolute;
					left: 50%;
					bottom: 12rpx;
					transform: translateX(-50%);
					width: 50rpx;
					height: 4rpx;
					background:linear-gradient(135deg,rgba(209,2,168,1) 0%,rgba(210,23,40,1) 100%);
					border-radius:2px;
				}
			}
		}
	}


	// 消息数量
	.msgCount {
		position: absolute;
		bottom: 50rpx;
		right: 32rpx;
		min-width: 26rpx;
		width: auto;
		height:26rpx;
		line-height: 26rpx;
		text-align: center;
		font-size:20rpx;
		font-family:PingFang SC;
		font-weight:bold;
		color:rgba(219,13,83,1);
		background:rgba(255,255,255,1);
		box-shadow:0px 1rpx 4rpx 0px rgba(68,68,68,0.2);
		border-radius:26rpx;
	}


	//商品角标
	.goodsCorner {
		position: absolute;
		top: 0px;
		width: 100%;
	}

	//活动信息
	.activityInfo-Container {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: relative;
		margin: 0 auto;
		padding: 20rpx 30rpx;
		width: 100%;
		height: 146rpx;
		background:linear-gradient(-45deg,rgba(236,85,56,1) 0%,rgba(241,101,40,1) 100%);

		.pricePercent {
			height: 100%;
			display: flex;
			flex-direction: column;
			justify-content: center;

			.price-Container {
				display: flex;
				align-items: center;
				justify-content: space-between;
				width: 100%;
				height: 58rpx;

				.priceOut {
					display: flex;
					flex-direction: column;
					justify-content: space-between;

					.activityPrice-Container {
						color: #FFFFFF;

						.money-icon {
							font-size: 30rpx;
							font-family: PingFang SC;
							font-weight: 500;
							color: #FFFFFF;
						}
						.price-int {
							font-size: 46rpx;
							font-family: PingFang SC;
							color: #FFFFFF;
						}
						.price-float {
							font-size: 24rpx;
							color: #FFFFFF;
						}

						.activityPrice {
							font-size:24rpx;
							color:rgba(255,255,255,1);
						}
					}
				}
			}

			.percent-Container {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 24rpx;

				.percentOut {
					display: flex;
					align-items: center;
					justify-content: space-between;
					position: relative;
					overflow: hidden;
					width:240rpx;
					height:24rpx;
					background:rgba(255,212,216,0.4);
					border-radius:12rpx;

					.percentIn {
						height:24rpx;
						background:rgba(255,212,216,1);
						border-radius:12rpx;
					}

					.percentText {
						position: absolute;
						left: 0;
						top: 0;
						width:240rpx;
						height:24rpx;
						line-height: 24rpx;
						text-align: center;
						font-size:18rpx;
						font-family:PingFang SC;
						color:#E01327;
					}
				}
			}
		}
		.marketPrice {
			font-size: 24rpx;
			color: #FFFFFF;
		}
		.surplusText {
			text-align: right;
			font-size:24rpx;
			font-family:PingFang SC;
			color:#FFFFFF;
		}

		.logoBg {
			position: absolute;
			top: 0;
			right: 170rpx;
			width: 166rpx;
			height: 146rpx;
		}
	}


//小程序安全区域
.safeBottom {
	z-index: 9;
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 100rpx;
	height: calc(100rpx + constant(safe-area-inset-bottom));
	height: calc(100rpx + env(safe-area-inset-bottom));
	background-color: #FFFFFF;
}
.controller-bar {
	z-index: 99999;
	display: flex;
	justify-content: space-between;
	position: absolute;
	left: 0;
	bottom: 0;
	bottom: calc(constant(safe-area-inset-bottom));
	bottom: calc(env(safe-area-inset-bottom));
	width: 100%;
	height: 100rpx;
	box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.1);
	background-color: #FFFFFF;
}
</style>




